package fr.utbm.aiechat.localisation;

import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;

public class MyLocationUpdater implements LocationListener{ //change location interface
    private double lat, lng;
	
	public double getLat() {
		return lat;
	}

	public double getLng() {
		return lng;
	}

	@Override
    public void onLocationChanged(Location location) {
        lat = location.getLatitude() * 1E6;
        lng = location.getLongitude() * 1E6;

        //System.out.println("The latitude is " + lat + "and "  + "the longitude is "+ lng)
     // TODO send a UDP message to give the new position
        
    }

    @Override
    public void onProviderDisabled(String arg0) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onProviderEnabled(String arg0) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onStatusChanged(String arg0, int arg1, Bundle arg2) {
        // TODO Auto-generated method stub
	}
}